1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, and in more detail, relates to an image processing apparatus and an image processing method which perform processing of superimposing a foreground image object on a background image object.
2. Description of the Related Art
Conventionally, an image formation system is able to generate print information suitable for the image formation system on the basis of input information and to perform image output. Specifically, the image formation system changes an image processing parameter on the basis of attribute information included in an input rendering instruction and generates the image. Here, the attribute information is information indicating a kind of rendering instruction such as text, line, graphic, and image, for example.
Even for the rendering instruction which is an instruction of filling the same region, a rule to be used in determining the color of a pixel according to the rendering instruction (rendering rule for the rendering instruction) is sometimes different in a case of the different attribute information such as graphic and image. For example, rendering processing of PostScript (registered trademark) defines a different rendering rule depending on the attribute information. In rendering process of an object having the line, text, or graphic attribute, a pixel which crosses a rendering region of the object even slightly is filled. Hereinafter, this rule is called as a cross rule. In rendering process of an object having the image attribute, only a pixel which has the center within a rendering region of the object is filled. Hereinafter, this rule is called as a center rule. The fact that the rendering rule for a pixel unit is different depending on the attribute information is not limited to PostScript (registered trademark), and there are similar cases in other page description languages.
Meanwhile, through the recent diversification of applications and OS, the rendering instruction becomes complicated and the load on the rendering processing or image processing is being increased. For performing high-speed processing of the complicated rendering instruction, sometimes the image of one object (called an object image) is divided into a plurality of rendering instructions by an application for convenience of computer processing. The reason is that, for example, data amount becomes extremely larger as the size of the object image becomes larger, and the load on processing resources becomes heavy for performing processing of the object collectively. Generally, in object image division processing by an application, an object image is divided into a plurality of rendering regions adjacent to each other. In other words, originally one object image is divided into a plurality of rendering instructions. One or a plurality of backside rendering instructions for rendering a background object and one front-side rendering instruction for rendering a foreground object are issued for each of the rendering regions. Meanwhile, the order of the rendering regions to be processed is determined by a rendering direction (for example, from the bottom to the top of a page). As to each of the rendering regions, the backside rendering instruction is issued first, and the front-side rendering instruction is issued last.
Here, whether or not the image obtained by the rendering result of the plurality of rendering instructions after the division was the originally one object image is referred to as integrity of the rendering instruction. As a technique of determining the integrity of the divided rendering instructions during the rendering, there is a technique of determining the integrity of the rendering instructions by using content information including region arrangement information, an enlargement factor, resolution, default set color, and the like in the rendering instruction (refer to Japanese Patent No. 3707523).
In the technique of Japanese Patent No. 3707523, however, no particular consideration is given to the rendering rule for the rendering instruction. There is a case where, in performing the rendering instruction which is divided by an application, a line having a background color which does not exist in an original object appears at a border part of the rendering region because of a difference in the rendering rule for filling a pixel between a background object and a foreground object. The technique of Japanese Patent No. 3707523 cannot pre-detect such a phenomenon. Hereinafter, an occurrence of such phenomenon will be explained specifically by the use of FIG. 4 to FIG. 7.
FIG. 4 is an example of an object image on an application. An object image 400 in FIG. 4 is an original object image to be processed by the application.
FIG. 5 is an example of the rendering instructions generated by the application. For high-speed processing of complicated rendering instruction, an application sometimes generates a divided plurality of rendering instructions for an object image. In FIG. 5, a graphic (for example, in white background color) rendering instruction is divided into four graphic rendering instructions for rendering the rendering regions of a graphic. An image rendering instruction is divided into four image rendering instructions for rendering object images on the front-side of the graphic. Further, a page output instruction 509 of outputting the page is included. The attribute information of the graphic rendering instructions 501, 503, 505, and 507 is graphic and the attribute information of the image rendering instructions 502, 504, 506, and 508 is image. The first argument to the fourth argument in the graphic rendering instruction and the image rendering instruction express the X-coordinate and Y-coordinate at the lower left-hand corner of the rendering region and the X-coordinate and Y-coordinate of the upper right-hand corner of the rendering region, respectively. The unit of the coordinate thereof is pt (point: 1/72 inches). The fifth argument in the graphic rendering instruction expresses a rendering color, that is, white color in this example. The fifth argument in the image rendering instruction expresses an image data storage variable. The contents of the image data are omitted in this example.
The rendering instructions are issued in order of 501, 502, 503, . . . , and the rendering is performed in accordance with the last issued rendering instruction in a case where the rendering regions overlap each other. Generally, frequently in the division processing of the object image in an application, one or a plurality of backside rendering instructions and a front-side rendering instruction(s) which regionally includes the backside rendering instructions are generated as one unit for a series of the rendering instructions regionally adjacent to each other. In this example, the graphic rendering instructions 501, 503, 505, and 507 are the backside rendering instructions, and the image rendering instructions 502, 504, 506, and 508 are the front-side rendering instructions which regionally include the graphic rendering instructions 501, 503, 505, and 507, respectively.
FIG. 6A is a diagram schematically showing a positional relationship of the objects which are rendered by the rendering instructions of FIG. 5. Graphics 601, 603, 605, and 607 are background objects which are rendered by the graphic rendering instructions 501, 503, 505, and 507 (backside rendering instructions), respectively. The images 602, 604, 606, and 608 are foreground objects which are rendered by the image rendering instructions 502, 504, 506, and 508 (front-side rendering instructions), respectively. The graphics 601, 603, 605, and 607 have differences between the coordinates of the adjacent outlines and are not adjacent to each other. Although an example in which the graphics 601, 603, 605, and 607 are not adjacent to each other has been shown here, explanation of processing is the same even in a case of being adjacent to each other. The images 602, 604, 606, and 608 have completely the same coordinates in the adjacent outlines and are adjacent to each other. In this manner, the regions of the images 602, 604, 606, and 608 completely include the regions of the graphics 601, 603, 605, and 607, respectively, and are positioned on the front-side.
FIG. 6B is a diagram obtained by enlarging a partial region 609 on a border between the image 602 and the image 604. FIG. 6B shows a pixel 610 and the center 611 thereof. The size of the pixel 610 depends on the resolution of the image processing system. Here, for simplicity, the size of the pixel is 1.0 pt. In this example, all of the outline 612 of the graphic 601, the outline 614 of the graphic 603, and the border 613 between the image 602 and the image 604 pass through the pixel 610. Here, the “outline” is used as a word meaning a line dividing the inside and the outside of a region, and the “border” is used as a word meaning a line where the two adjacent regions make contact with each other.
Since the graphics 601 and 603 are rendered by the cross rule according to the rendering rule for PostScript (registered trademark), the pixel 610 in the rendering region is filled. On the other side, since the images 602 and 604 are rendered by the center rule, only the image 602 in which the center 611 of the pixel 610 is within the rendering region fills the pixel 610 and the image 604 does not fill the pixel 610. That is, according to the rendering rule, the graphic 601 of the background object, the image 602 of the foreground object, and the graphic 603 of the background object fill the pixel 610. The image 604 of the foreground object does not fill the pixel 610. Furthermore, since the rendering is performed according to the last issued rendering instruction in a case where the rendering regions overlap each other, the pixel 610 is filled with the color of the graphic 603 of the background object.
FIG. 7 is a diagram schematically expressing a rendering result of the rendering instructions of FIG. 5. The pixels positioned on the borders between the images 602, 604, 606, and 608 of the foreground objects are filled with the colors of the graphics 603, 605, and 607 of the background objects and appear as white lines 701 having a width of one pixel. This line does not exist in the original object image 400 and is recognized as being undesirable by a user. Please note that, in FIG. 7, the outline of the white line 701 is added for explanation and is not rendered actually.
As described above, in the technique of Japanese Patent No. 3707523, no particular consideration is given to the rendering rule for the rendering instruction. Therefore, with use of the technique, it is not possible to detect the rendering in the border part between the objects rendered by the divided rendering instructions which is occurred by the difference in the rendering rule for filling the pixel between the background object and the foreground object.